
package podcastbyphone.server;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.*;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import podcastbyphone.client.PodcastMap;
import podcastbyphone.client.RpcService;
import podcastbyphone.client.Podcast;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

import twilio.client.Calls;
import twilio.client.urlconnection.TwilioClient;

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class RpcServiceImpl extends RemoteServiceServlet implements
		RpcService
{
	private Log log = LogFactory.getLog(RpcServiceImpl.class);
	
	protected TwilioClient getTwilioClient()
	{
		return TwilioProperties.createClient();
	}

	public Calls getCalls(int number)
	{
		TwilioClient client = getTwilioClient();
		return client.getCalls(number);
	}

	public PodcastMap getPodcastMap()
	{
		return new PodcastMap();
	}

	
}
